import request from '@/utils/request'

// 获取搜索列表得数
export const getProList = (obj) => {
  const {
    categoryId,
    goodsName,
    page
  } = obj
  return request.get('/goods/list', {
    params: {
      categoryId,
      goodsName,
      page
    }
  })
}
// 获取商品详情
export const getProductDetil = (goodsId) => {
  return request.get('/goods/detail',
    {
      params: {
        goodsId
      }
    })
}
// 获取商品评论
export const getProductComment = (obj) => {
  const { goodsId, limit } = obj
  return request.get('/comment/listRows', {
    params: {
      goodsId,
      limit
    }
  })
}
